package com.beirtipol.travel.activities.dom;

public class LineStatus
{
    public static enum ServiceClass
    {
	GOOD_SERVICE("GS"), //
	DISRUPTED_SERVICE("PC"), //
	SUSPENDED_SERVICE("SS");// TODO

	private final String statusID;

	private ServiceClass(String statusID)
	{
	    this.statusID = statusID;
	}

	public static ServiceClass parse(String id)
	{
	    for (ServiceClass sc : values())
	    {
		if (sc.statusID.equalsIgnoreCase(id))
		{
		    return sc;
		}
	    }
	    return null;
	}
    }

    private ServiceClass status;
    private String       description;
    private boolean      isActive;
    private String       statusDetails;

    public ServiceClass getStatus()
    {
	return status;
    }

    public void setStatus(ServiceClass status)
    {
	this.status = status;
    }

    public String getDescription()
    {
	return description;
    }

    public void setDescription(String description)
    {
	this.description = description;
    }

    public boolean isActive()
    {
	return isActive;
    }

    public void setActive(boolean isActive)
    {
	this.isActive = isActive;
    }

    public String getStatusDetails()
    {
	return statusDetails;
    }

    public void setStatusDetails(String statusDetails)
    {
	this.statusDetails = statusDetails;
    }

    @Override
    public String toString()
    {
	return "LineStatus [status=" + status + ", description=" + description + ", isActive=" + isActive + ", statusDetails=" + statusDetails + "]";
    }

}